iconhelper: treat the empty string as a NULL stock-id
authorMurray Cumming <murrayc@murrayc.com>
Fri, 26 Oct 2012 14:32:14 +0000 (16:32 +0200)
committerSébastien Wilmet <swilmet@gnome.org>
Fri, 4 Jan 2013 16:21:11 +0000 (17:21 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=687025

gtk/gtkiconhelper.c

index 74eae6901d61efeb132ba18b570022a4e8acadd8..10ce2493dee3f6f534aab929cdc6d73f5a7be474 100644 (file)
@@ -469,7 +469,8 @@ _gtk_icon_helper_set_stock_id (GtkIconHelper *self,
 {
   _gtk_icon_helper_clear (self);
 
-  if (stock_id != NULL)
+  if (stock_id != NULL &&
+      g_strcmp0 (stock_id, "") != 0)
     {
       self->priv->storage_type = GTK_IMAGE_STOCK;
       self->priv->stock_id = g_strdup (stock_id);